package com.ncsc.lmis.model;
// Generated Feb 25, 2014 11:44:39 PM by Hibernate Tools 3.4.0.CR1


import java.math.BigDecimal;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * SysApproveLevelRate generated by hbm2java
 */
@Entity
@Table(name="sys_approve_level_rate"
    ,catalog="lmis"
)
public class SysApproveLevelRate  implements java.io.Serializable {


     private SysApproveLevelRateId id;
     private SysApproveLevel sysApproveLevel;
     private BigDecimal approvedMaxVal;
     private short approvedLevelSeqNo;

    public SysApproveLevelRate() {
    }

    public SysApproveLevelRate(SysApproveLevelRateId id, SysApproveLevel sysApproveLevel, BigDecimal approvedMaxVal, short approvedLevelSeqNo) {
       this.id = id;
       this.sysApproveLevel = sysApproveLevel;
       this.approvedMaxVal = approvedMaxVal;
       this.approvedLevelSeqNo = approvedLevelSeqNo;
    }
   
     @EmbeddedId

    
    @AttributeOverrides( {
        @AttributeOverride(name="loanTypeNo", column=@Column(name="LOAN_TYPE_NO", nullable=false) ), 
        @AttributeOverride(name="approvedLevelNo", column=@Column(name="APPROVED_LEVEL_NO", nullable=false) ) } )
    public SysApproveLevelRateId getId() {
        return this.id;
    }
    
    public void setId(SysApproveLevelRateId id) {
        this.id = id;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="APPROVED_LEVEL_NO", nullable=false, insertable=false, updatable=false)
    public SysApproveLevel getSysApproveLevel() {
        return this.sysApproveLevel;
    }
    
    public void setSysApproveLevel(SysApproveLevel sysApproveLevel) {
        this.sysApproveLevel = sysApproveLevel;
    }

    
    @Column(name="APPROVED_MAX_VAL", nullable=false, precision=15)
    public BigDecimal getApprovedMaxVal() {
        return this.approvedMaxVal;
    }
    
    public void setApprovedMaxVal(BigDecimal approvedMaxVal) {
        this.approvedMaxVal = approvedMaxVal;
    }

    
    @Column(name="APPROVED_LEVEL_SEQ_NO", nullable=false)
    public short getApprovedLevelSeqNo() {
        return this.approvedLevelSeqNo;
    }
    
    public void setApprovedLevelSeqNo(short approvedLevelSeqNo) {
        this.approvedLevelSeqNo = approvedLevelSeqNo;
    }




}


